#include "workermi.h"
#include <iostream>
using std::cin;
using std::cout;
using std::endl;

/* Worker */
Worker::~Worker() {}

void Worker::Data() const
{
    cout << "Name: " << fullname << endl;
    cout << "ID: " << id << endl;
}
void Worker::Get()
{
    getline(cin, fullname);
    cin >> id;
    while(cin.get() != '\n') continue;
}

/* Waiter */
void Waiter::Set()
{
    Worker::Get();
    Get();
}
void Waiter::Show() const
{
    cout << "Category: waiter" << endl;
    Worker::Data();
    Data();
}
void Waiter::Data() const
{
    cout << "Panache rating: " << panache << endl;
}
void Waiter::Get()
{
    cin >> panache;
    while(cin.get() != '\n') continue;
}

/* Singer */
void Singer::Set()
{
    Worker::Get();
    Get();
}
void Singer::Show() const
{
    cout << "Category: singer" << endl;
    Worker::Data();
    Data();
}
void Singer::Data() const
{
    cout << "voice: " << voice << endl;
}
void Singer::Get()
{
    cin >> voice;
    while(cin.get() != '\n') continue;
}

/**
 * SingingWaiter 
 * 模块化
 */
void SingingWaiter::Set()
{
    Worker::Get();
    Get();
}
void SingingWaiter::Show() const
{
    cout << "Category: singingwaiter" << endl;
    Worker::Data();
    Data();
}
void SingingWaiter::Data() const
{
    Waiter::Data();
    Singer::Data();
}
void SingingWaiter::Get()
{
    Waiter::Get();
    Singer::Get();
}
